home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / childenc / oecdemo / shared.dir / 00444_scroll down.ls < prev    next >
Encoding:
Text File  |  1996-07-24  |  1.5 KB  |  45 lines

  1. on mouseDown
  2.   global CR, menuText, linePtr, offsetPtr, tempText, displayLines, scrDnCast
  3.   if menuText <> EMPTY then
  4.     set tempText to field 441
  5.     set totLines to the number of lines in menuText
  6.     set the castNum of sprite clickOn() to scrDnCast + 1
  7.     updateStage()
  8.     repeat while the mouseDown
  9.       if offsetPtr < (totLines - displayLines) then
  10.         set offsetPtr to offsetPtr + 1
  11.         delete line 1 of tempText
  12.         set tempText to tempText & CR & line offsetPtr + displayLines of menuText
  13.         put tempText into field 441
  14.         if the locH of sprite 48 < 1000 then
  15.           set theLocV to the locV of sprite 48
  16.           set the visible of sprite 48 to 0
  17.           set theLocV to theLocV - the textHeight of field 441
  18.           set the locV of sprite 48 to theLocV
  19.           if (theLocV < the bottom of sprite 39) and (theLocV >= the top of sprite 39) then
  20.             if rollOver(41) then
  21.               set the visible of sprite 48 to 1
  22.             end if
  23.           end if
  24.         end if
  25.         setScroll(47, offsetPtr, totLines, 441)
  26.         updateStage()
  27.       end if
  28.     end repeat
  29.     set the castNum of sprite clickOn() to scrDnCast
  30.     updateStage()
  31.   else
  32.     set me to the clickOn
  33.     set x to the castNum of sprite me
  34.     set the castNum of sprite me to x + 1
  35.     repeat while the mouseDown
  36.       updateStage()
  37.     end repeat
  38.     set the castNum of sprite me to x
  39.     updateStage()
  40.     if rollOver(me) then
  41.       nothing()
  42.     end if
  43.   end if
  44. end
  45.